#include("./common/header.html", {title:"通知中心"})
<div class="container">
    <div class="row">
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">通知中心</h3>
                </div>
                <div class="panel-body">
                    #if(null != remindPage)
                    <ul class="media-list">
                        #for(item : remindPage.list)
                        <li class="media" id="${item.id}">
                            <div class="media-body">
                                <h4 class="media-heading topic-list-heading">
                                    <small>
                                        <a href="${base_url('/member/') + item.from_user}">${item.from_user}</a>
                                        <span>${timespan(item.created)}</span>
                                        #if(item.remind_type=='comment')
                                        评论了帖子 <a href="${base_url('/topic/') + item.event_id}">${item.title}</a>
                                        #elseif(item.remind_type=='favorite')
                                        收藏了你的帖子 <a href="${base_url('/topic/') + item.event_id}">${item.title}</a>
                                        #elseif(item.remind_type=='at')
                                        在帖子 <a href="${base_url('/topic/') + item.event_id}">${item.title}</a> 中提到了你
                                        #end
                                    </small>
                                </h4>
                                ${item.content}
                            </div>
                        </li>
                        <hr class="smallhr">
                        #end
                    </ul>

                    #if(remindPage.pages > 1)
                    <ul class="pager">
                        #if(remindPage.pageNum > 1)
                        <li class="pull-left"><a href="${base_url('/reminds?p=') + remindPage.prevPage}">上一页</a></li>
                        #end
                        #if(remindPage.pages > 1 && remindPage.pageNum != remindPage.pages)
                        <li class="pull-right"><a href="${base_url('/reminds?p=') + remindPage.nextPage}">下一页</a></li>
                        #end
                    </ul>
                    #end

                    #else
                    <div class="alert alert-info">嗨，${login_user.username}！你还没有通知。</div>
                    #end
                </div>
            </div>
        </div><!-- /.col-md-8 -->
        #include("./common/sidebar.html")
    </div>
</div>
#include("./common/footer.html")
<script type="text/javascript">
    jc.post({
        url: '/reminds/clean',
        success: function (result) {
            console.log(result);
        }
    });
</script>
</body>
</html>